package cn.kgc.springcloud.web.handlers;

import cn.kgc.springcloud.web.response.ResponseResult;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.ExceptionHandler;

/**
 * @author 课工场
 * @date 2024/7/30
 * @description
 */
@Component
public class GlobalExceptionHandler {

    @ExceptionHandler(Exception.class)
    public ResponseResult  otherException(Exception e){
        e.printStackTrace();
        return ResponseResult.error();
    }
}
